<!DOCTYPE html>
<html>

<head>
    <meta charset="utf-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <title>v-for</title>
    <h3>v-for</h3>
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <!-- 引入vue.js -->
    <script src="https://cdn.jsdelivr.net/npm/vue/dist/vue.js"></script>


</head>

<body>
    <div id="box">
        <ol>
            <li v-for="txt in txts">
                {{ txt.text }}
            </li>
        </ol>
    </div>

</body>
<script>
    var box = new Vue({
        el: '#box',
        data: {
            txts: [{
                text: 'Java'
            }, {
                text: 'Vue'
            }, {
                text: 'Html'
            }]


        }
    })

    box.txts.push({
        text: 'Css'
    })
</script>

</html>